import request from '@/utils/request'

// 查询商户列表
export function listMerchants(query) {
  return request({
    url: '/admin/merchants/list',
    method: 'get',
    params: query
  })
}

// 查询商户详细
export function getMerchants(id) {
  return request({
    url: '/admin/merchants/' + id,
    method: 'get'
  })
}

// 新增商户
export function addMerchants(data) {
  return request({
    url: '/admin/merchants',
    method: 'post',
    data: data
  })
}

// 修改商户
export function updateMerchants(data) {
  return request({
    url: '/admin/merchants',
    method: 'put',
    data: data
  })
}

// 删除商户
export function delMerchants(id) {
  return request({
    url: '/admin/merchants/' + id,
    method: 'delete'
  })
}
